# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=h2csmuggler
pkgver=7.7ea573a
pkgrel=8
groups=('blackarch' 'blackarch-webapp')
pkgdesc='HTTP Request Smuggling over HTTP/2 Cleartext (h2c).'
arch=('any')
url='https://github.com/BishopFox/h2csmuggler'
license=('MIT')
depends=('python' 'python-h2' 'python-urllib3')
makedepends=('git')
source=("git+https://github.com/BishopFox/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

